﻿<baseClass:Control 
	xmlns:baseClass="clr-namespace:EFS.RC.Survey.Controls" 
	
	xmlns:my="clr-namespace:EFS.Common.UI.Controls;assembly=EFS.Common.UI"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk" xmlns:HyperlinkButtons="clr-namespace:EFS.RC.Survey.Controls.HyperlinkButtons"
	x:Class="EFS.RC.Survey.Controls.List"
    mc:Ignorable="d"
    d:DesignHeight="500" d:DesignWidth="480" Loaded="Control_Loaded">

	<Grid Height="500" Width="475" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
		<Grid Margin="0,35,0,0" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
			<Grid.Background>
				<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
					<GradientStop Color="White" Offset="0.64" />
					<GradientStop Color="WhiteSmoke" Offset="1" />
				</LinearGradientBrush>
			</Grid.Background>
			<sdk:DataGrid AutoGenerateColumns="False" HorizontalAlignment="Stretch" Margin="0,6,10,266" x:Name="dataGridSurveys" VerticalAlignment="Stretch" Opacity="0.7" CanUserReorderColumns="False">
				<sdk:DataGrid.Columns>
					<sdk:DataGridTextColumn Binding="{Binding Name}" Header="Name" IsReadOnly="True" Width="*" />
					<!-- Open -->
					<sdk:DataGridTemplateColumn Header="Start">
						<sdk:DataGridTemplateColumn.CellTemplate>
							<DataTemplate>
								<HyperlinkButton Content="Start" Click="StartSurvey_Click" VerticalContentAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Center"/>
							</DataTemplate>
						</sdk:DataGridTemplateColumn.CellTemplate>
					</sdk:DataGridTemplateColumn>
				</sdk:DataGrid.Columns>
			</sdk:DataGrid>

			<sdk:DataGrid AutoGenerateColumns="False" HorizontalAlignment="Stretch" Margin="0,249,10,31" x:Name="dataGridSurveySessions" VerticalAlignment="Stretch" Opacity="0.7" CanUserReorderColumns="False" LoadingRow="dataGridSurveySessions_LoadingRow">
				<sdk:DataGrid.Columns>
					<sdk:DataGridTextColumn Binding="{Binding Survey.Name}" Header="Survey Name" IsReadOnly="True" Width="*" />
					<sdk:DataGridTextColumn Binding="{Binding UserFirstName}" Header="User Firstname" IsReadOnly="True" Width="*" />
					<sdk:DataGridTextColumn Binding="{Binding UserLastName}" Header="User Last Name" IsReadOnly="True" Width="*" />
					<!-- Open -->
					<sdk:DataGridTemplateColumn Header="Open">
						<sdk:DataGridTemplateColumn.CellTemplate>
							<DataTemplate>
								<HyperlinkButtons:Open Content="Open" Click="OpenSurvey_Click" VerticalAlignment="Center" HorizontalAlignment="Center" />
							</DataTemplate>
						</sdk:DataGridTemplateColumn.CellTemplate>
					</sdk:DataGridTemplateColumn>
					<!-- View -->
					<sdk:DataGridTemplateColumn Header="View">
						<sdk:DataGridTemplateColumn.CellTemplate>
							<DataTemplate>
								<HyperlinkButton Content="View" TargetName="_blank" VerticalAlignment="Center" HorizontalAlignment="Center"/>
							</DataTemplate>
						</sdk:DataGridTemplateColumn.CellTemplate>
					</sdk:DataGridTemplateColumn>
				</sdk:DataGrid.Columns>
			</sdk:DataGrid>
		</Grid>
	</Grid>
</baseClass:Control>